﻿using Assets.XyzCode.Comm;

namespace Assets.XyzCode.Fight.Game.Enemy
{
    partial class Enemy_X_Behav
    {
        /** 站立 Cd */
        private readonly CdTimer _standCd = new CdTimer(0.001f);

        /// <summary>
        /// 执行站立
        /// </summary>
        /// <param name="keepTime">保持时间, 单位 = 秒</param>
        public void DoStand(float keepTime)
        {
            if (!CanSwitchStateTo(StateEnum.Stand))
            {
                return;
            }

            StopRun();

            _currState = StateEnum.Stand;
            _standCd.Reset().Fill().Extra(keepTime);
            PlayDBAnim("Stand");
        }
    }
}
